#include <iostream>
using namespace std;
void funcRef(int &x) {
  int y = x;
  int& z = y;
}
void funcPtr(int* x) {
  int y = *x;
  int* z = &y;
}
int main() {
  int x = 1;
  funcRef(x);
  funcPtr(&x);
  int* p1 = &x;
  int** p2 = &p1;
  int*** p3 = &p2;
  cout << *p1 << endl;
  cout << **p2 << endl;
  cout << ***p3 << endl;
}